/**
 * 
 */
package com.honghao.student.thread;

import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;


/**
 * @author honghao.li
 *
 */
@ThreadSafe
public class Sequence {
    
    @GuardedBy("this") private int value;
    
    public synchronized int getNext(){
        return value++;
    }
}
